//package com.candy.candyorder.config;
//
//import com.baomidou.mybatisplus.autoconfigure.MybatisPlusProperties;
//import com.baomidou.mybatisplus.core.MybatisConfiguration;
//import com.baomidou.mybatisplus.core.config.GlobalConfig;
//import com.baomidou.mybatisplus.core.toolkit.GlobalConfigUtils;
//import org.apache.ibatis.type.LocalDateTypeHandler;
//import org.apache.ibatis.type.LocalTimeTypeHandler;
//import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
//import org.springframework.context.annotation.Configuration;
//
//import javax.sql.DataSource;
//import java.time.LocalDate;
//import java.time.LocalTime;
//
///**
// * @author suYanLong
// * @version 1.0
// * @date 2023/4/12 15:33
// * @Description 描述
// */
//@Configuration
//@ConditionalOnBean(DataSource.class)
////@MapperScan("io.**.mapper")
//public class MybatisPlusConfiguration {
//
//    public MybatisPlusConfiguration(MybatisPlusProperties mybatisPlusProperties) {
//        MybatisConfiguration configuration = mybatisPlusProperties.getConfiguration();
//        GlobalConfig globalConfig = mybatisPlusProperties.getGlobalConfig();
//        GlobalConfigUtils.setGlobalConfig(configuration, globalConfig);
////        configuration.getTypeHandlerRegistry().register(LocalDateTime.class, new CustomLocalDateTimeTypeHandler());
//        configuration.getTypeHandlerRegistry().register(LocalDate.class, new LocalDateTypeHandler());
//        configuration.getTypeHandlerRegistry().register(LocalTime.class, new LocalTimeTypeHandler());
//        GlobalConfigUtils.setGlobalConfig(configuration, globalConfig);
//    }
//
//}